<?php
require('init.php');
echo $_POST['user'];
if( isset($_POST['user']) ){
	$conexion = connect();
$query = "SELECT username FROM users WHERE username = '".$_POST['user']."'";
$res = mysql_query($query, $conexion) or die(mysql_error());
	
	//$cont = $DB->q('SELECT answer FROM solic_account WHERE email=%s ',$email);
	$exit_user = mysql_fetch_array($res, MYSQL_NUM);

	$tam_res = mysql_num_rows($res);
echo "tamaño:".$tam_res."xx" ;
print_r($exit_user);

if( $tam_res > 0 ){
	echo "no"; // username no disponible 
}else{
	echo "yes"; // username disponible
}
}



?>

